package com.simon.nvwo.modules.designerpattern.iterator;

/**
 * 实体类
 *
 * @author zhaoyiwu
 * @create 2018-03-07 20:45
 **/
public class ChineseFoodItem implements Item{


    private String[] foods=new String[4];

    private int position=0;

    @Override
    public void add(String name) {

        foods[position]=name;
        position+=1;
    }

    @Override
    public Iterator getIterator() {

        return new ChineseFoodIterator(foods);
    }
}
